package com.netease.xone.activity;

import Utils.XoneUtil;
import android.content.pm.ActivityInfo;
import android.os.Bundle;

import com.actionbarsherlock.app.ActionBar;
import com.netease.framework.activity.ActivityBase;
import com.netease.mobidroid.DATracker;
import com.netease.xone.notification.NotificationBarMgr;

public class ActivityX1Base extends ActivityBase {
    protected ActionBar mActionBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        DATracker.enableTracker(this, "MA-8CE8-1458500FD511", XoneUtil.getNumberVersion(this), XoneUtil.getAppChannelID(this));
        mActionBar = getSupportActionBar();
        if (null != mActionBar) {
            mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
            mActionBar.setDisplayShowHomeEnabled(true);
            mActionBar.setDisplayHomeAsUpEnabled(true);
            mActionBar.setDisplayShowTitleEnabled(true);
            mActionBar.setDisplayShowCustomEnabled(true);
            mActionBar.setDisplayUseLogoEnabled(true);
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        NotificationBarMgr.getInstance(getApplicationContext()).cancelPushAll();
        DATracker.getInstance().resume();
        
        setOrientation();
        
    }
    
    protected void setOrientation(){
        /**
         * 设置屏幕为竖屏
         */
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    @Override
    protected void onPause() {
        super.onPause();
        DATracker.getInstance().close();
    }
    
    @Override
    protected void requestFeature() {
        //		requestWindowFeature(Window.FEATURE_NO_TITLE);
    }

    @Override
    public void refreshContent() {
        // TODO Auto-generated method stub
    }

}
